window.addEventListener("pywebviewready", () => {
    document.getElementById("min").onclick = () => {pywebview.api.min(); }; 
    document.getElementById("quit").onclick = () => {pywebview.api.quit(); }; 
}); 